<div class="col-xs-12 dataTables_wrapper">
    {% if handle is defined %}
    <form id="nodeAction" class="form-inline" data-target="#main-content" role="form" accept-charset="utf-8" method="post" ajax-submit="#main" action="{{ url(['for':'adminNodeHandle']) }}">
    {% endif %}
        <table class="table table-striped table-bordered table-hover" id="sample-table-1">
            <thead>
                <tr>
                    <th class="center">
                            <input type="checkbox" class="checkAll" name="checkAll"> <span class="lbl"></span>
                    </th>
                    <th id="th-id">ID</th>
                    <th id="th-title">标题</th>
                    <th id="th-cat">作者</th>
                    <th id="th-tag">创建</th>
                    <th id="th-changed">更新</th>
                    <th id="th-handle">操作</th>
                </tr>
            </thead>
            <tbody>
                {% for item in data.items %}
                <tr class="tr-{{ item.node_id }}">
                    <td class="center">
                            <input type="checkbox" class="checkAll" name="checkAll[{{ item.node_id }}]"> <span class="lbl"></span>
                    </td>{% set sss = 'node_id' %}
                    <td class="center">{{  item.node_id }}</td>
                    <td><a href="{{ url(['for':'node','type':item.type,'id':item.node_id]) }}" data-toggle="tooltip" target="_blank" data-placement="right" title="访问{{ item.title }}">{{ item.title }}</a></td>
                    <td>{% if item.uid %}{{ user(item.uid,'name') }}{% else %}匿名{% endif %}</td>
                    <td>{{ date('Y-m-d H:i:s',item.created) }}</td>
                    <td>{{ date('Y-m-d H:i:s',item.changed) }}</td>
                    <td class="center"><a href="{{ url(['for':'adminNodeEditor','type':item.type,'id':item.node_id]) }}" class="btn btn-xs btn-info" data-target="#main">编辑</a>
                        <a href="{{ url(['for':'adminNodeDelete','id':item.node_id]) }}?re_url={{ url }}" class="btn btn-xs btn-danger" data-target="#main">删除</a></td>
                </tr>
                {% else %}
                    <tr><td colspan="7">没有数据</td></tr>
                {% endfor %}
            </tbody>
        </table>
        <div class="space-4"></div>
        {% if handle is defined %}
        <p>
            <i>选中文章：</i>
            {{ handle.getElement('action') }}
            <button type="submit" class="btn btn-xs btn-success" value="recycle">提交</button>
        </p>
        {% endif %}
    {% if handle is defined %}
    </form>
    {% endif %}
    <div class="space-8"></div>
    {{ partial("Themes/AdminLTE/templates/paginator") }}
</div>
<script type="text/javascript">
$(function () {
  $('[data-toggle="tooltip"]').tooltip();
});
</script>